package hanoi.tower;

import java.util.List;

import search.algorithms.BreadthFSwithLog;
import search.algorithms.DepthFSwithLog;

import es.deusto.ingenieria.is.search.formulation.State;



public class MainProgram {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			TorreHanoiProblem problem = new TorreHanoiProblem();
			perceptions p=new perceptions();
			p.Create();
			List<Torre> lista;
			lista=p.crearListaTorres();
			
			 					//hay que hacer la lista de torres 			
			State initialState = new TorreHanoiState(lista,p.getNumeroFichas(),p.getNumeroTorres(),p.getTorrefinal(),p.getTorreinicial());
			
			problem.addInitialState(initialState);		
			problem.solve(BreadthFSwithLog.getInstance());
			System.out.println("");
			problem.solve(DepthFSwithLog.getInstance());
		} catch (Exception ex) {
			System.err.println("% [Main Program] Error: " + ex.getMessage());
			ex.printStackTrace();
		}
	}

}
